#ifndef PCMODEL
#define PCMODEL
#include <mutex>				//std::mutexv std::unique_lock
#include <condition_variable>	//std::condition_variable
#include <chrono>				//std::chrono::seconds

class PCModel
{
public:
	int try_get_out();
	void put_in(int id);
	PCModel();
	~PCModel();

private:
	std::mutex producer_mut_;
	std::mutex consumer_mut_;
	std::condition_variable pro_manager_;
	std::condition_variable con_manager_;
	const size_t cMaxPoolSize_ = 20;
	int *pool_;
	int front_, size_;
	const std::chrono::seconds block_time_ = std::chrono::seconds(2);
};

#endif // !PCMODEL

